import unittest
from common.driver import Driver
from po.home.searchPage import SearchPage

class MyTest(unittest.TestCase):

    @classmethod
    def setUpClass(cls) -> None:
        cls.driver = Driver().startUp()
        print("执行所有用例前准备工作")
        cls.sp=SearchPage(cls.driver)

    def setUp(self) -> None:
        self.driver.launch_app()
        print("执行每条用例前准备工作")

    def tearDown(self) -> None:
        self.driver.close_app()
        print("执行每条用例后清理工作")

    @classmethod
    def tearDownClass(cls) -> None:
        cls.driver.quit()
        print("执行所有用例后清理工作")